/*
 *   Clovis
 *   Copyright (C) 2008 SFWOL
 *
 *   This program is free software: you can redistribute it and/or modify
 *   it under the terms of the GNU General Public License as published by
 *   the Free Software Foundation, either version 3 of the License, or
 *   any later version.
 *
 *   This program is distributed in the hope that it will be useful,
 *   but WITHOUT ANY WARRANTY; without even the implied warranty of
 *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 *   GNU General Public License for more details.
 *
 *   You should have received a copy of the GNU General Public License
 *   along with this program.  If not, see <http://www.gnu.org/licenses/>.
 *
 */

#ifndef __RECT_H
#define __RECT_H

#include "CInteger.h"
#include "Point.h"

namespace clovis {

	namespace core {

		/*!
		 * The Rectangle class.
		 * Used in GUI and basic 2D programming.
		 */
		class Rect {

			private:

				CInteger x;
				CInteger y;
				CInteger w;
				CInteger h;

			public:

				/*!
				 * Create a new Rect.
				 * \arg x The x position.
				 * \arg y The y position.
				 * \arg w The width.
				 * \arg h The height.
				 */
				Rect(CInteger x, CInteger y, CInteger w = 0, CInteger h = 0);

				/*!
				 * Set the position of the Rect using CInteger values.
				 * \arg x The new x position.
				 * \arg y The new y position.
				 */
				void setXY(CInteger x, CInteger y);

				/*!
				 * Set the position of the Rect using a Point object.
				 * \arg point A Point<CInteger> value corresponding to the new position.
				 */
				void setXY(Point<CInteger> point);

				/*!
				 * Get the current position of the rect as a Point<CInteger> value.
				 * \return A Point<CInteger> value corresponding to the current position of the Rect.
				 */
				Point<CInteger> getXY();

				/*!
				 * Set the current x position.
				 * \arg The new x position.
				 */
				void setX(CInteger x);

				/*!
				 * Set the current y position.
				 * \arg The new y position.
				 */
				void setY(CInteger y);

				/*!
				 * Set the current width.
				 * \arg The new width.
				 */
				void setW(CInteger w);

				/*!
				 * Set the current height.
				 * \arg The new height.
				 */
				void setH(CInteger h);

				/*!
				 * Get the current x position.
				 * \return The current x position.
				 */
				CInteger getX();

				/*!
				 * Get the current y position.
				 * \return The current y position.
				 */
				CInteger getY();

				/*!
				 * Get the current width.
				 * \return The current width.
				 */
				CInteger getW();

				/*!
				 * Get the current height.
				 * \return The current height.
				 */
				CInteger getH();

		};

	};

};

#endif // RECT_H_INCLUDED
